# class gou():
#     def __init__(self, ming, gouming):
#         self.ming = '小美'
#         self.gouming = '旺财'
#
#
# ming = gou
# ming.
# class A:
#     def __init__(self):
#         self.name = '小美'
#         self.dog = '旺财'
#
#     def gongyuan(self):
#         print(f"{self.name}在朝阳公园溜{self.dog}")
#
#
# a = A()
# a.gongyuan()
# 具有相同属性(行为)的对象变成类
class Person:
    def __init__(self, name):
        self.name = name

    def liu(self, dog, addr):  # 人的行为
        print(f"{self.name}在{addr.addrName}里溜{dog.name}")


class dog:
    def __init__(self, name):
        self.name = name


class addr:
    def __init__(self, name):
        self.addrName = name


p1 = Person("小美")
d1 = dog('旺财')
a1 = addr('朝阳公园')
p1.liu(d1, a1)
